﻿namespace Microsoft.VisualStudio.TextTemplating.CommandLine
{
    using System;
    using System.Runtime.Serialization;
    using System.Security.Permissions;

    [Serializable]
    internal class CommandException : Exception
    {
        private Microsoft.VisualStudio.TextTemplating.CommandLine.Command command;

        public CommandException()
        {
        }

        public CommandException(string s) : base(s)
        {
        }

        protected CommandException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }

        [SecurityPermission(SecurityAction.Demand, SerializationFormatter=true)]
        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);
        }

        public Microsoft.VisualStudio.TextTemplating.CommandLine.Command Command
        {
            get
            {
                return this.command;
            }
            set
            {
                this.command = value;
            }
        }
    }
}

